package rpg.state
{
	import rpg.animation.Animation;
	import rpg.avatar.AvatarComponent;
	import rpg.role.Hero;

	public class StateBase
	{
		public var stateID : int;
		public var role : Hero;
		public var stateComponent : StateComponent

		public function StateBase(hero : Hero , stateMachine : StateComponent)
		{
			this.role = hero;
			this.stateComponent = stateMachine;
		}

		/**
		 * 更新动作
		 * @param delay
		 *
		 */
		public function update(delay : uint) : void
		{

		}

		public function changeState(id : int) : void
		{

		}

		/**
		 * 销毁动作
		 *
		 */
		public function destory() : void
		{
			role = null;
			stateComponent = null;
		}

		/**
		 * 每次转换动作前,需要把上个动作清除
		 *
		 */
		public function clear() : void
		{

		}
	}
}